package com.example.mapper;

import com.example.entity.Village;
import com.example.result.CommonResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @project: smart-property
 * @description: 小区信息管理 mapper 层
 * @author: cjq
 * @create: 2022-11-15 10:53
 **/
@Mapper
public interface VillageMapper {
    /**
     * 判断小区编号是否重复
     * @param villageNumber
     * @return
     */
    Village listVillageNumber(String villageNumber);

    /**
     * 添加小区信息
     * @param village
     * @return
     */
    int addVillageInfo(Village village);

    /**
     * 小区列表信息展示
     * @return
     */
    List<Village> queryVillageInfo();

    /**
     * 修改小区信息
     * @param village
     * @return
     */
    int updateVillageInfo(Village village);

    /**
     * 删除小区信息
     * @param id
     * @return
     */
    int delVillageInfo(@Param("id") Integer id);
}
